package com.we823.cms.repository.service;

import java.io.Serializable;
import java.util.List;

import com.github.pagehelper.PageInfo;
import com.we823.cms.common.web.pageable.PageRequest;
import com.we823.cms.common.web.pageable.Sort;
import com.we823.cms.model.BaseModel;

public interface BaseService<T extends BaseModel<ID>, ID extends Serializable> {
	int add(T entity);
	int edit(T entity, ID id);
	void delete(ID key);
	T findOne(ID key);
	List<T> findAll();
	List<T> findAll(Sort sort);
	PageInfo<T> findAll(PageRequest pageRequest);
}
